package dw.catalog

import grails.rest.RestfulController;

/**
 * Implementation of a REST interface for Catalog domain class.
 */
class CatalogController extends RestfulController {

    static responseFormats = ['json', 'xml']
	
	CatalogController() {
		super(Catalog)
	}
	
	/**
	 * Return a catalog based on given ID
	 * @param id ID string
	 * @return dw.catalog.Catalog
	 */
	def showByID(String ID) {
		def result = Catalog.find("FROM Catalog AS c WHERE c.ID = ?", [ID])
		respond result
	}
}
